package com.mall.mapper;

import com.mall.po.Discounts;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author zhanghui
 * @ClassName DiscountsMapper
 * @Description 优惠活动
 * @Date 2021/1/6 20:42
 * @Version 1.0
 **/
public interface DiscountsMapper {
        /**
         * @Author zhanghui
         * @Description 添加优惠活动
         * @Date 2021/1/6 20:47
         * @Param [discounts]
         * @return int
         **/

        public int insertDiscounts(Discounts discounts);
        /**
         * @Author zhanghui
         * @Description 删除优惠活动
         * @Date 2021/1/6 20:47
         * @Param [activitysid]
         * @return int
         **/
        public int deleteDiscounts(int discountsid);

        /**
         * @Author zhanghui
         * @Description 修改优惠活动
         * @Date 2021/1/5 20:27
         * @Param
         * @return
         **/
        public int updateDiscounts(Discounts discounts);

        /**
         * @Author zhanghui
         * @Description 根据活动商品名称查询优惠活动
         * @Date 2021/1/5 20:28
         * @Param
         * @return
         **/
        public Discounts selectActityBydiscountsname(String discountsname);

        /**
         * @Author zhanghui
         * @Description 批量删除
         * @Date 2021/1/7 15:48
         * @Param [discountsids]
         * @return boolean
         **/
        public boolean deleteDiscountsList(Integer[] discountsids);

        public List<Discounts> selectDiscountsByPage(@Param("page") int page,@Param("pagesize") int pagesize);

}
